﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class JumpIntoAnotherCanvas : MonoBehaviour {

	public Canvas current;
	public Canvas next;
	// Use this for initialization
	void Start () {
		Button btn = this.GetComponent<Button>();
		btn.onClick.AddListener(OnClick);
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	private void OnClick(){
		current.sortingOrder=0;
		next.sortingOrder=1;
	}
}
